package cn.edu.hunau.oop.day02.extend;

import org.junit.Test;

/**
 * @author hb
 * @date 2025-08-05 11:14:35
 */
public class GooTest {
   @Test
   public void test(){
     Parent p1=new Child();
     p1.setInfo("child...");
     System.out.println(p1.getInfo());
   }
}
class Parent{
    private String info;
    public void setInfo(String info){
        this.info=info;
    }

    public String getInfo(){
        return  this.info;
    }
}

class Child extends Parent{
    private String info;

    public void setInfo(String info){
         this.info=info;
    }

    public String getInfo(){
        return  this.info;
    }
}